<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <th:block th:include="admin/bootstrap :: head">
    </th:block>
</head>
<body style="width:auto;height:800px;background: white">
    <div  th:replace="admin/bootstrap :: admin1">
        <!-- 头部位置-->
    </div>
    <div style="margin-left:200px;width:auto;height:auto;background: white"class="container" >
        <form th:action="@{/admin/CmusicList}" method="post" enctype="multipart/form-data">
            <div class="form row">
                <div  class="form-horizontal col-md-offset-3" id="login_form">
                    <h3 class="form-title">上传歌曲</h3>
                    <p style="color:darkolivegreen"th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
                    <div class="col-md-9">
                        <div class="form-group col-md-offset-9">
                            <i class="fa fa-lock fa-lg"></i>
                            <label>请选择歌曲封面:</label>
                            <input class="file" type="file" name="songimg"autofocus="autofocus">
                        </div>

                        <div class="form-group">
                            <i class="fa fa-lock fa-lg"></i>
                            <input class="form-control required" type="text" name="musicname" placeholder="音乐名" autofocus="autofocus">
                        </div>
                        <div class="form-group">
                            <i class="fa fa-lock fa-lg"></i>
                            <input class="form-control required" type="text" name="singer" placeholder="歌手" autofocus="autofocus">
                        </div>
                        <div class="form-group">
                            <label>状态选择:</label>
                            <select name="time">
                                <option>免费</option>
                                <option>会员</option>
                            </select>
                            &nbsp;&nbsp;&nbsp;
                            <label>选择上传到的专辑</label>
                            <select name="leibiename">
                                <option value="0">无</option>
                                <option value="lover">lover</option>
                                <option value="1989">1989</option>
                                <option value="rep">rep</option>
                                <option value="luhan">luhan</option>
                            </select>
                        </div>
                        <div class="form-group col-md-offset-9">
                            <i class="fa fa-lock fa-lg"></i>
                            <label>请选择歌曲文件:</label>
                            <input  class="file music" type="file" name="file">
                            <input hidden type="text" name="targetUriMp3" value="//Users/mac/Desktop/music/songbook"/>
                            <input hidden type="text" name="targetUriImage" value="//Users/mac/Desktop/music/imgbook"/>
                            <input hidden type="text" name="targetUriText" value="//Users/mac/Desktop/music/lrcbook"/>
                        </div>
                        <div class="form-group col-md-offset-9">
                            <i class="fa fa-lock fa-lg"></i>
                            <label>请选择歌词文件:</label>
                            <input  class="file" type="file" name="lrc">
                        </div>
                        <div class="form-group col-md-offset-9">
                            <button type="submit" class="finalBtn btn btn-success pull-right" name="submit">提交</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>

        <script th:inline="javascript">
            var targetMp3 = [[${dest1}]]
            var finalBtn = document.getElementsByClassName("music")[0]
            finalBtn.addEventListener("click", () => {
                console.log(1, finalBtn.value)
            })

        </script>
        <!--        <form method="post" action="/admin/CmusicList" enctype="multipart/form-data">-->
<!--            <input type="file" name="file"><br>-->
<!--            <input type="submit" value="提交">-->
<!--        </form>-->
    </div>

</body>
</html>